This page last changed on Jul 30, 2008 by stepheneb.

See also OTrunk ID System

In otrunk you can store references to other objects.
For this example lets say you two OTClasses: OTHouse OTDoor

You want your OTHouse to have a reference to a OTDoor.

To do this you modify your OTHouse interface or resource schema like this:

  OTDoor getDoor();
  void setDoor(OTDoor door);

There are a few ways this can be represented as in the otml.

OTDoor with uuid id and attribute reference in OTHouse

<OTDoor id="7B26E396-7DE9-4B6D-AE21-F6296DF1B8B8"/>
<OTHouse door="7B26E396-7DE9-4B6D-AE21-F6296DF1B8B8"/>

OTDoor with uuid id and element reference in OTHouse

<OTDoor id="7B26E396-7DE9-4B6D-AE21-F6296DF1B8B8"/>
<OTHouse>
   <door>
      <object refid="7B26E396-7DE9-4B6D-AE21-F6296DF1B8B8"/>
   </door>
</OTHouse>

OTDoor with local_id and attribute reference in OTHouse

<OTDoor local_id="door_id"/>
<OTHouse door="${door_id}"/>

OTDoor with local_id and element reference in OTHouse

<OTDoor local_id="door_id"/>
<OTHouse>
   <door>
      <object refid="${door_id}"/>
   </door>
</OTHouse>
Document generated by Confluence on Jan 27, 2014 16:52